<!-- BEGIN SIDEBAR MENU -->
<ul class="page-sidebar-menu">
    <li>
        <!-- BEGIN SIDEBAR TOGGLER BUTTON -->
        <div class="sidebar-toggler hidden-phone"></div>
        <!-- BEGIN SIDEBAR TOGGLER BUTTON -->
    </li>
    <li>
        <!-- BEGIN RESPONSIVE QUICK SEARCH FORM -->
        <form class="sidebar-search">
            <div class="input-box">
                <a href="javascript:;" class="remove"></a>
                <input type="text" placeholder="Search..." />
                <input type="button" class="submit" value=" " />
            </div>
        </form>
        <!-- END RESPONSIVE QUICK SEARCH FORM -->
    </li>

    <?php foreach ($menulist as $key => $menu) { ?>
    <li class="<?php echo ($key == 0 ? 'start open ' : (($key + 1) == count($menulist) ? 'last ' : '')); ?>">
        <a href="javascript:;">
        <i class="icon-bookmark-empty"></i>
        <span class="title"><?php echo $menu['title']; ?></span>
        <span class="arrow <?php echo $key == 0 ? 'open ' : ''; ?>"></span>
        </a>
        <ul class="sub-menu" <?php echo $key == 0 ? 'style="display: block;"' : ''; ?>>
            <?php foreach($menu['childs'] as $child_menu) { ?>
            <li id="_MP<?php echo $child_menu['id']; ?>">
                <a href="javascript:Index._MP(<?php echo $child_menu['id']; ?>,'<?php echo url($child_menu['module'] . '/' . $child_menu['action'], ['cid' => $child_menu['id']]) . ($child_menu['params'] ? ('&'. $child_menu['params']) : '') ?>');"><?php echo $child_menu['title']; ?></a>
            </li>
            <?php } ?>
        </ul>
    </li>
    <?php } ?>
</ul>
<!-- END SIDEBAR MENU -->